package org.tacticalTroopers.jme.common.message;

import com.jme3.network.message.Message;
import com.jme3.network.serializing.Serializable;

@Serializable()
public class Command extends Message{

	public static final String NULL = "";
	public static final String QUIT = "quit";
	public static final String RESET = "reset";
	public static final String SWITCH_TEAM = "switchTeam";
	
	Float accel = 0f;
	Float turn = 0f;
	Float straf = 0f;
	Boolean fire = false;
	String order=NULL;


	public Float getStraf() {
		return straf;
	}

	public void setStraf(Float straf) {
		this.straf = straf;
	}

	public Float getAccel() {
		return accel;
	}

	public void setAccel(Float accel) {
		this.accel = accel;
	}

	public Float getTurn() {
		return turn;
	}

	public void setTurn(Float f) {
		turn = f;
	}

	public void setFire(Boolean fire){
		this.fire = fire;
	}

	public Boolean getFire(){
		return fire;
	}

	public void set(Command command) {
		accel = command.getAccel();
		turn = command.getTurn();
		fire = command.getFire();
		straf = command.getStraf();
		order = command.getOrder();
	}
	
	public String getOrder() {
		return order;
	}

	public void setOrder(String order) {
		this.order = order;
	}

	
	@Override
	public String toString() {
		return "Command{ accel:"+accel+" turn:"+turn+" fire:"+fire+" straf:"+straf+" order:"+order+"}";
	}

}
